<html>
<head><meta charset="utf-8"><title>nvim+nvim-lsp rustc_private · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim.2Bnvim-lsp.20rustc_private.html">nvim+nvim-lsp rustc_private</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="235471089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim%2Bnvim-lsp%20rustc_private/near/235471089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim.2Bnvim-lsp.20rustc_private.html#235471089">(Apr 21 2021 at 08:10)</a>:</h4>
<p>is ra only works for vscode with <code>rustc_private</code>? I installed the rust-src component and enabled rust-analyzer in my Cargo.toml:</p>
<div class="codehilite" data-code-language="TOML"><pre><span></span><code><span class="k">[package.metadata.rust-analyzer]</span>
<span class="n">rustc_private</span> <span class="o">=</span> <span class="kc">true</span>
</code></pre></div>
<p>but it still error with <code>unresolved extern crate</code>.<br>
<a href="/user_uploads/4715/02RF7f7AkTkkTGxWFjTkw68m/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/02RF7f7AkTkkTGxWFjTkw68m/image.png" title="image.png"><img src="/user_uploads/4715/02RF7f7AkTkkTGxWFjTkw68m/image.png"></a></div>



<a name="235481597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/nvim%2Bnvim-lsp%20rustc_private/near/235481597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/nvim.2Bnvim-lsp.20rustc_private.html#235481597">(Apr 21 2021 at 09:43)</a>:</h4>
<p>I'm not sure, but from the docs it sounds like you also need to set <code>rust-analyzer.rustcSource</code>. <code>rust-src</code> has the standard library, not compiler source code</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>